package com.example.lifecycle

import android.util.Log
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent

class MyServiceObserver:LifecycleObserver {
    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    fun startLoc(){
        Log.e("zzm debug","MyServiceObserver startLoc")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    fun stopLoc(){
        Log.e("zzm debug","MyServiceObserver stopLoc")
    }
}